package ar.edu.itba.it.pdc.configuration;

import java.io.IOException;
import java.util.List;

import ar.edu.itba.it.pdc.nio.ProtocolRunner;
import ar.edu.itba.it.pdc.nio.TCPProtocol;

public class ProxyConfigurator {

	private static final int BUFSIZE = 256; // Buffer size (bytes)
	
	public static void run() throws IOException {		
		
		List<Integer> ports = ProxyConfigurationLoader.getInstance().getValuesAsInteger("config_ports");
		
		TCPProtocol protocol = new ConfiguringProtocol(BUFSIZE);
		
		ProtocolRunner runner = new ProtocolRunner();
		
		runner.run(ports, protocol);
	}	
	
}
